package cn.lxh.remote.api;

import cn.lxh.constants.Constants;
import cn.lxh.remote.fallback.DriverFeignApiFallbackFactory;
import cn.lxh.remote.pojo.result.DriverSummaryResult;
import cn.lxh.result.JSONResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

/**
 * @author lxh Create Time: 2023/12/23 17:03
 * DriverFeignApi接口
 */
@FeignClient(value = Constants.Remote.SERVICE_DRIVER, fallbackFactory = DriverFeignApiFallbackFactory.class)
public interface DriverFeignApi {

    /**
     * 获取司机今日取消订单和今日投诉订单
     * @return
     */
    @PostMapping("/remote/driver/getDriverSummary/{driverId}")
    JSONResult<DriverSummaryResult> getDriverSummary(@PathVariable Long driverId);

    /**
     * 添加投诉
     * @return
     */
    @PostMapping("/remote/driver/addTodayComplaintOrder/{driverId}")
    JSONResult addTodayComplaintOrder(@PathVariable Long driverId);

    /**
     * 减去投诉
     * @return
     */
    @PostMapping("/remote/driver/subTodayComplaintOrder/{driverId}")
    JSONResult subTodayComplaintOrder(@PathVariable Long driverId);



}
